R.T.D puts up a timedisplay in the form 'hh:mm:ss' or 'mm:ss:ff' (where ff is frames) or a short version in the form 'hh:mm' or 'mm:ss'.
R.T.D is very simple to use: Its simplest form is if you call the 'me.ShowDateTime' - method once a second to display the current time.
By default R.T.D is completely selfcontained and doesn’t depend on anything. In this case it brings up a standard time-display.
OTOH you are free to use your own pictures for the digits. Simply pass a picture as parameter to the ‘SetDigits’ method and there it is. The picture must contain digits in this order “0123456789:”
Picture-Example
.
Digits must have equal width in order for the class to display the bounds correctly.
Properties:
digitcolor as Color // color of the hilited segments of a digit
shadowcolor as Color // color of the unhilited segments of a digit
backcolor as Color // color of the background of the RTD. (white is transparent by default)
digits as picture // if you want to show custom digits, simply save a picture of your custom digits here
curtime as integer // the current time shown in RTDTicks
Methods:
ShowTime // simply shows the current time
ShowTimeString s as string // ‘hh:mm:ss’-formatted string, allowed chars “0123456789:”
ShowCurrentTime // Wrapper Script to show the current time according to the current mode (long or short)
SetDigits newDigits as picture // pass a picture of digits to be shown as RTD
// if you pass NIL as parameter, the RTD will switch to INTERNAL mode
SetDigitsResource resID as integer // Wrapper to set the digits to a ‘PICT’-resource with this id
SetDigitColor newColor as color // changes the color of the digits (while you could set these color properties manually)
// it is safer to call this method to handle the required action
SetShadowColor newColor as color // changes the color of the unhilited segments of a digit
SetBackColor newColor as color // changes the background color of a RTD.
SetColors newDigitColor, newShadowColor, newBackColor as color // Wrapper script to change all colors at once
PenSize // returns the current penSize
SetPenSize newSize as integer // in a RTD width & height of the pen is equal; this methods sets both values at once
InvertClock // Wrapper to invert an internal clock
R.T.D - CONTENTS
Along with this ‘Read Me’ file you should find some more files:
- RTD Projectfile
This is a quick introduction to the RIC-API (Application Programming Interface). You will get an idea of how easy Internet Connectivity is, when using RIC.
- CTimeDisplay - class
CTimeDisplay - class is the main part of RTD. It contains the routines which do the ‘hard’ work.
- RTD-Demo
This demo shows various RTDs and give you an idea how to use the CTimeDisplay class.
http://www.silent-movie-media.com/
RTD - REQUIREMENTS
RTD has no special system requirements.
NOTE
For the sake of speed, CTimeDisplay does not validate the passed string in ‘DrawTimeString’. So be sure to pass only allowed chars, if you want CTimeDisplay to operate properly.
Version History
1.0.2 - 10 Oct 1999
- upon request (Francine Smit) a minus (-) sign is added to dynamic RTD's. Resource-based RTD's are not affected by this change.
---
1.0.1 - 10 Aug 1999
- fixed a bug where auto-adjust caused a wrong resize if a RTD's color was changed